package com.bracketbird.client.gui.club.tournament.rtc;


import com.bracketbird.client.model.tournament.*;
import com.bracketbird.client.service.rtc.*;

/**
 *
 */
public class UpdateMatchEventHandler extends RTCClientEventHandler{
    private TournamentLevel level;
    private MatchVO matchVO;

    protected UpdateMatchEventHandler(boolean fromClient, TournamentLevel tl, MatchVO vo) {
        super(fromClient);
        this.level = tl;
        this.matchVO = vo;
    }


    @Override
    protected boolean shouldWarn() {
        return false;
    }

    @Override
    protected String getWarning() {
        return null;  //To change body of implemented methods use File | Settings | File Templates.
    }


    protected RTCEvent createEventToServer(){
        return RTCEventFac.createUpdateMatchEvent(level, matchVO);

    }
    protected void updateTournament(){
        RTC.getInstance().getTournament().updateMatch(level, matchVO, fromClient);

    }


}
